package com.kaigejava.DecoratorModelzhuangshizhe.coffeebar;

import com.kaigejava.DecoratorModelzhuangshizhe.coffeebar.coffee.Decaf;
import com.kaigejava.DecoratorModelzhuangshizhe.coffeebar.coffee.LongBlack;
import com.kaigejava.DecoratorModelzhuangshizhe.coffeebar.seasoning.Chocolate;
import com.kaigejava.DecoratorModelzhuangshizhe.coffeebar.seasoning.Milk;

/**
 * Created by kaigejava on 2019/8/13.
 * 凯哥咖啡馆-测试类
 */
public class KaiGeCoffeeBar {
    public static void main(String[] args) {
        DrinkComponent order;
        order = new Decaf();
        System.out.println("order1 price:"+order.cost());
        System.out.println("order1 desc:"+order.getDescription());

        System.out.println("****************");
        order=new LongBlack();
        order=new Milk(order);
        order=new Chocolate(order);
        order=new Chocolate(order);
        System.out.println("order2 price:"+order.cost());
        System.out.println("order2 desc:"+order.getDescription());
    }
}
